namespace CSharpPro._1014;

//创建学生类Student
public class Student
{
    public string StudentId { get; set; } 
    public string Name { get; set; } 
    public int Age { get; set; } 

     
    public void Enroll() 
    {
        Console.WriteLine($"{Name}（学号：{StudentId}）已入学。");
    }

    public void Grow() 
    {
        Age++;
        Console.WriteLine($"{Name} 长大了一岁，现在 {Age} 岁。");
    }

    public void Graduate() 
    {
        Console.WriteLine($"{Name}（学号：{StudentId}）已毕业。");
    }

    public static void Test1(string[] args)
    {
        Student student = new Student
        {
            StudentId = "S001",
            Name = "张三",
            Age = 18
        };
        
        student.Enroll();
        student.Grow();
        student.Graduate();

        Console.ReadKey();
    }
}